<%@ attribute name="bindPath" required="true" %>
<%@ attribute name="required" required="false" %>
<%@ attribute name="defaultDate" required="false" %>
<%@ attribute name="disabled" required="false" %>

<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<c:set var="contextPath">
    <%=response.encodeURL(request.getContextPath())%>
</c:set>    
    <form:input path="${bindPath}" size="12" maxlength="11" disabled="${disabled}" readonly="true"/>
    <c:if test="${not disabled}">
        <img src="${contextPath}/images/calendar.gif" style="vertical-align: bottom;"
             onmouseover="this.style.cursor='pointer'"
             onmouseout="this.style.cursor='default'"
             onclick="return showCalendar('${bindPath}', '%m/%d/%Y');"/>
    </c:if>
